<?php

use yii\helpers\Html;
use yii\grid\GridView;


$this->title = Yii::t('app', 'Users');
$this->params['breadcrumbs'][] = $this->title;

?>
<div class="user-index">

    <div class="box">
        <div class="box-header">
            <?= Html::a(Yii::t('app', 'Create User'), ['create'], ['class' => 'btn btn-success']) ?>
        </div>
        <div class="box-body">
        <p>
            <?php echo $this->render('_search', ['model' => $searchModel]); ?>
        </p>

        <?= GridView::widget([
            'dataProvider' => $dataProvider,
            'layout'  =>  "{items}\n{summary}\n{pager}",
            'columns' => [
                ['class' => 'yii\grid\SerialColumn'],
                'username',
                //'auth_key',
                //'password_hash',
                //'password_reset_token',
                'email',
                'name',
                'code',
                //'company',
                //'status',
                //'created_at',
                //'updated_at',

                [
                    'class' => 'yii\grid\ActionColumn',
                    'header' => '操 作',
                    'template' =>"{view} {update}"
                ],
            ],
        ]); ?>
        </div>
    </div>
</div>
